<extend name="./Application/Admin/View/Layout/application.html"/>
<block name="css">
    <style>
        .daterangepicker {
            display: none;
        }
    </style>
    <!--<link rel="stylesheet" href="__PUBLIC__/vendor/daterangepicker/daterangepicker.css">-->
    <link rel="stylesheet" href="__PUBLIC__/vendor/datepicker/dist/datepicker.css" >

</block>

<block name="content">


    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">会员列表</strong> /
                    <small>Customer List</small>
                </div>
            </div>

            <hr>


            <div class="am-g">

                <form class="am-form-inline" role="form" method="get">

                    <div class="am-form-group">
                        <input style="width: 130px;height: 32px;margin: 2px 2px" type="text" class="am-form-field"
                               name="nickname"
                               placeholder="按昵称" value="{{$_GET['nickname']}}">

                    </div>

                    <div class="am-form-group">
                        <input style="width: 130px;height: 32px;margin: 2px 2px" type="text" class="am-form-field"
                               name="mobile"
                               placeholder="按手机号" value="{{$_GET['mobile']}}">

                    </div>


                    <div class="am-form-group">
                        <div class="am-input-group am-input-group-sm">
                            <input type="text" data-toggle="datepicker" name="birthday" class="am-form-field" style="width: 180px">
                            <span class="am-input-group-btn">
                            <button class="am-btn am-btn-default" type="submit">搜索</button>
                            </span>
                            <span class="am-input-group-btn">
                            <a href="{{:U('Customer/index')}}" class="am-btn am-btn-default" type="button">重置</a>
                            </span>
                        </div>
                    </div>
                </form>
            </div>

            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th class="table-check"><input type="checkbox"/></th>
                                <th class="table-id">ID</th>
                                <th class="table-title">昵称</th>
                                <th class="table-title">头像</th>
                                <th class="table-type">性别</th>
                                <th class="table-type">手机号</th>
                                <th class="table-author am-hide-sm-only">生日</th>
                                <th class="table-author am-hide-sm-only">邮箱</th>
                                <th class="table-date am-hide-sm-only">注册时间</th>
                                <th class="table-set">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="customers" id="customer">
                            <tr>
                                <td><input type="checkbox"/></td>
                                <td>{{$customer.id}}</td>
                                <td class="am-hide-sm-only">{{$customer.nickname}}</td>
                                <td><a href="#">
                                    <img src="{{$customer.thumb}}" alt="" style="width: 60px;height: 60px">

                                </a></td>
                                <td>
                                    <eq name="customer.sex" value="1">
                                        <span class="am-icon-btn am-primary am-icon-male"></span>
                                        <else/>
                                        <span class="am-icon-btn am-danger am-icon-female"></span>
                                    </eq>
                                </td>
                                <td class="am-hide-sm-only">{{$customer.mobile}}</td>
                                <td class="am-hide-sm-only">{{$customer.birthday|date="Y-m-d",###}}</td>
                                <td class="am-hide-sm-only">{{$customer.email}}</td>
                                <td class="am-hide-sm-only">{{$customer.created_at|date="Y-m-d",###}}</td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <a href="{{:U('Order/index',['name'=>$customer[nickname]])}}"
                                               class="am-btn am-btn-secondary am-btn-xs"><span
                                                    class="am-icon-eye"></span> 查看订单
                                            </a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </volist>
                            </tbody>
                        </table>
                        <div class="am-cf">
                            共 {{$count}} 条记录
                            <div class="am-fr">
                                <ul class="am-pagination">
                                    <li class="am-disabled"><a href="#">«</a></li>
                                    <li class="am-active"><a href="#">1</a></li>
                                    {{$pages}}
                                    <li><a href="#">»</a></li>
                                </ul>
                            </div>
                        </div>
                        <hr/>
                        <p>注：.....</p>
                    </form>
                </div>

            </div>
        </div>

        <footer class="admin-content-footer">
            <hr>
            <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
        </footer>

    </div>
    <!-- content end -->
</block>
<block name="js">
    <!--<script src="__PUBLIC__/vendor/daterangepicker/moment.js"></script>-->
    <script src="__PUBLIC__/vendor/moment/locale/zh-cn.js"></script>
    <!--<script src="__PUBLIC__/vendor/daterangepicker/daterangepicker.js"></script>-->
    <!--<script src="__PUBLIC__/assets/admin/js/daterange_config.js"></script>-->
    <script src="__PUBLIC__/vendor/datepicker/dist/datepicker.js"></script>
    <script src="__PUBLIC__/vendor/datepicker/i18n/datepicker.zh-CN.js"></script>

    <script>
        $(function () {
            $('[data-toggle="datepicker"]').datepicker({
                language: 'zh-CN'
            });
        })
    </script>

</block>
